public class test {

    public static void main(String[] args) {
        int [][] arr={{1,2,3,4},{5,6,7,8},{9,10,11,12},{13,14,15,16}};
        int left=0;
        int top=1;
        int r=arr.length;
       int bott=arr.length-1;
        for (int i = 0; i < 1; i++) {
            for (int j = 0; j <r ; j++) {
                System.out.print(arr[left][j]);


            }
            left++;
            System.out.println();
            for (int j = top; j<=bott; j++) {


                System.out.println(arr[j][r-1]);

            }
             top++;
        }

    }
}
